package com.ysd.crm.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.ysd.crm.model.Modules;

public interface IModulesDao extends JpaRepository<Modules, Integer>{

	//角色分配模块查询
	@Query(value="select m.id,m.title,m.parent_id,concat(rm.role_id,'') checkArr from modules m left join role_module_tb rm on m.id = rm.module_id and rm.role_id=:rid",nativeQuery = true)
	List<Object[]> findModulesByRid(int rid);
}
